package com.hkts.beltweigher.master.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author hml
 * @since 2024-04-10
 */
public class YbRunAccumulate extends Model<YbRunAccumulate> {

    private static final long serialVersionUID = 1L;

    private Integer id;
    /**
     * 仪表
     */
    private String instrumentName;
    /**
     * 总值
     */
    private Float total;
    /**
     * 开始值
     */
    private Float startValue;
    /**
     * 结束值
     */
    private Float endValue;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    private LocalDateTime endTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getInstrumentName() {
        return instrumentName;
    }

    public void setInstrumentName(String instrumentName) {
        this.instrumentName = instrumentName;
    }

    public Float getTotal() {
        return total;
    }

    public void setTotal(Float total) {
        this.total = total;
    }

    public Float getStartValue() {
        return startValue;
    }

    public void setStartValue(Float startValue) {
        this.startValue = startValue;
    }

    public Float getEndValue() {
        return endValue;
    }

    public void setEndValue(Float endValue) {
        this.endValue = endValue;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public static final String ID = "id";

    public static final String INSTRUMENT_NAME = "instrument_name";

    public static final String TOTAL = "total";

    public static final String START_VALUE = "start_value";

    public static final String END_VALUE = "end_value";

    public static final String START_TIME = "start_time";

    public static final String END_TIME = "end_time";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "YbRunAccumulate{" +
                ", id=" + id +
                ", instrumentName=" + instrumentName +
                ", total=" + total +
                ", startValue=" + startValue +
                ", endValue=" + endValue +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                "}";
    }
}
